local M = {}

M.formatters = {}
M.formatters_by_ft = {}

M.setup = function(opts)
    opts = opts or {}
    opts.formatters = opts.formatters or {}
    opts.formatters_by_ft = opts.formatters_by_ft or {}
	-- Create a named autocmd group for autocmds so that if this file/plugin gets reloaded, the existing
	-- autocmd group will be cleared, and autocmds will be recreated, rather than being duplicated.
	local augroup = vim.api.nvim_create_augroup("Hello", { clear = true })

	vim.api.nvim_create_autocmd("BufWritePre", {
		pattern = "*",
		group = augroup,
		callback = function(args)
			if not vim.api.nvim_buf_is_valid(args.buf) or vim.bo[args.buf].buftype ~= "" then
				return
			end
		end,
	})

	-- Create a new command: :HelloInfo
	vim.api.nvim_create_user_command("HelloInfo", function()
		require("hello.health").check()
	end, { desc = "Show information about hello" })
end

M.hello = function()
	print("called hello function")
end

return M
